package org.whuims.pois.dao;

import org.whuims.pois.hibernate.BaseDao;
import org.whuims.pois.model.PaperEntity;

import java.util.List;

/**
 * Created by asus on 2014/7/9.
 */
public class PaperDao {

    BaseDao baseDao = new BaseDao();
    public List<PaperEntity> getPapers(){
        List<PaperEntity> list = baseDao.find("from PaperEntity");
        return list;
    }

    public List<PaperEntity> getPapersParams(int start, int pagesize, String language){

        List<PaperEntity> list = baseDao.find("from PaperEntity where planguage='"+language+"' order by pyear desc limit '"+start+"', '"+pagesize+"'");

        return list;
    }
}
